package com.xb.cloud.order.service.client.bo;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单基础信息类
 * 
 * @ClassName: BaseSellOrderBo
 * @author: 鲜备科技
 * @date: 2018年1月5日 下午2:32:41
 * 
 * @Copyright: 2018 www.xianbeitech.com Inc. All rights reserved.
 *
 */
public class BaseSellOrderBo {

	// 订单基本信息
	private Long id;
	private Long companyId;
	private Long endUserId;
	private Long merchantId;
	private Long shopId;

	private Long parentSoId;
	private Byte isLeaf;// 是否为叶子订单

	private BigDecimal orderAmount;// 订单最终金额
	private BigDecimal skuAmount;// 产品总金额(各个订单明细的金额总和)
	private BigDecimal deliveryFee;// 运费

	private Byte businessType;// 订单类型:0:普通订单,1商家代订单

	// 订单状态：10-未支付20-已支付25-转DO30-已发货 40-已收货 50-已完成 60-送货失败70-已取消
	private Integer soStatus;
	private Byte orderNeedInvoice;// 发票类型 0 不需要，1 普通发票，2增值税发票

	private String soUserRemark;// 用户留给商家的备注
	private String soCsRemark;// 客服备注

	private Byte isUserDeleted;// 逻辑删除标识:0-未删除,1-回收站2-已删除
	private Date createTime;
	private Date updateTime;

	/**
	 * 支付信息
	 */
	private Byte paymentType;// 付款方式:1.微信支付 2.支付宝
	private Integer paymentTimeLimitType;// 订单付款时间类型0-如24小时内支付1-如15分钟内支付，对应另一张配置表
	private Date paymentConfirmTime;// 付款确认时间（余额全额付款，gos写入，其他为付款时支付回写）

	/**
	 * 代客下单
	 */
	private Long createCsId;// 创建客服id
	private String createCsName;// 创建客服账户名

	/**
	 * 订单取消信息
	 */
	private Long cancelReasonId;// 取消订单原因id，cancel_reason
	private Date cancelTime;// 订单取消时间
	private String cancelCsName;// 订单取消客服账号名
	private Long cancelCsId;// 订单取消客服id

	/**
	 * 物流信息
	 */
	private Long warehouseId;// 仓库id
	private String goodReceiverName;
	private String goodReceiverPhone;
	private String goodReceiverPostCode;
	private String goodReceiverCountry;
	private String goodReceiverProvince;
	private String goodReceiverCity;
	private String goodReceiverCounty;
	private String goodReceiverArea;
	private String goodReceiverAddress;
	private Long goodReceiverCountryId;
	private Long goodReceiverProvinceId;
	private Long goodReceiverCityId;
	private Long goodReceiverCountyId;
	private Long goodReceiverAreaId;
	private Long deliveryType;// 配送方式:10001 普通快递 10002ems 10003顺丰
	private Date deliveryTime;// 实际发货时间
	private Date receiveTime;// 实际收货时间
	/**
	 * 物流信息扩展字段
	 */
	private BigDecimal orderWeightNet;// 订单净重
	private BigDecimal orderWeightGross;// 订单毛重
	private Date estimateDeliveryTime;// 平台预计发货时间
	private Date estimateReceiveDate;// 平台预计送达日期
	private Date so2doTime;// so转DO时间
	// 送货单的特殊要求 0:送货单打印无特殊要求 1:送货单打印不打印金额 默认为0，如果为0或空表示送货单打印无特殊要求
	private Byte isDoPrintSpec;


	/**
	 * 系统扩展信息和订单渠道
	 */
	private Integer soPlatform;// 订单平台：0-平台自己 1-tmall
	private Integer soChannel;// 订单渠道：0-ios,1-android,2-h5,3-pc
	private String soChannelVersion;// 对应so_channel的版本信息
	private Long versionNo;
	private String serviceIp;// 订单服务ip
	private String callServiceIp;// 调用订单服务ip
	private String userIp;
	private String userDevicecode;

	/**
	 * 订单金额扩展信息
	 */
	private Integer pointAward;// 奖励积分数量
	private BigDecimal orderPromotionDiscount;// 订单满立减金额
	private BigDecimal deliveryFeePaidByCoupon;// 运费抵用券金额
	private BigDecimal orderPaidByCoupon;// 抵用券支付金额
	private BigDecimal orderPaidByRebate;// 用返利余额支付的金额
	private BigDecimal orderPaidByAccount;// 账户余额支付金额
	private Integer orderPaidByPoint;// 消耗积分数量
	// 支付方式对应的支付金额(order_amount减去delivery_fee_paid_by_coupon减去order_paid_by_coupon减去order_paid_by_rebate减去order_paid_by_account。除运费抵用券，现金账户支付金额，返利支付金额，礼品卡支付金额，抵用券支付金额)
	private BigDecimal orderPaidByOthers;
	private BigDecimal csAdjustFee;// 客服订单价格调整。大于零加价金额，小于零减价金额

	public static void main(String[] args) {
		Class clazz = SoBo.class;
		Class clazz1 = BaseSellOrderBo.class;

		Field[] declaredFields = clazz.getDeclaredFields();
		for (Field field : declaredFields) {
			try {
				clazz1.getDeclaredField(field.getName());
			} catch (Exception e) {
				System.out.println(field.getName());
			}
		}

	}
}
